var oInputs = document.querySelectorAll('input');
var oBtn = document.querySelector('.btn-box');
    oBtn.onclick = function () {
        axios.post('/user/login', { phone: oInputs[0].value, pass: oInputs[1].value }).then((res) => {
            if (res.data.code == 200) {
                localStorage.setItem('userinfo', JSON.stringify(res.data.userinfo))
                alert('登录成功')
                location.href='./index.html'
            } else {
                alert('登录失败')
            }
        })

    }